﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeFile="Default.aspx.cs" Inherits="User_Default" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="Server">
    <asp:UpdatePanel runat="server" ID="uplUserDetail">
        <ContentTemplate>
            <ajaxToolkit:TabContainer ID="tbcUserDetail" Visible="true" runat="server" ActiveTabIndex="0"
                Width="880px">
                <ajaxToolkit:TabPanel runat="server" HeaderText="UserDetail" ID="tbcUserDetail_Info">
                    <HeaderTemplate>
                        <img src="../Images/Icons/16/Briefcase-icon.png" class="tab_header_img" title="School Info"
                            alt="Entity" />
                        Info
                    </HeaderTemplate>
                    <ContentTemplate>
                        <asp:UpdatePanel runat="server" ID="uplUserDetailForm" UpdateMode="Conditional">
                            <ContentTemplate>
                                <asp:ValidationSummary ID="vsUserDetailForm" ShowSummary="false" runat="server" />
                                <asp:HiddenField ID="hidUserDetailID" Value="-1" runat="server" />
                                <asp:HiddenField ID="hidUserID" Value="-1" runat="server" />
                                <asp:Panel runat="server" ID="pnlUserDetailForm" BackColor="#ffffcc">
                                    <table width="100%" cellpadding="3">
                                        <tr>
                                            <td>
                                                Name
                                            </td>
                                            <td colspan="4">
                                                <asp:DropDownList ID="ddlTitle" runat="server">
                                                    <asp:ListItem Text="Mr." Value="Mr." />
                                                    <asp:ListItem Text="Ms." Value="Ms." />
                                                    <asp:ListItem Text="Miss." Value="Miss." />
                                                    <asp:ListItem Text="Mdm." Value="Mdm." />
                                                    <asp:ListItem Text="Mrs." Value="Mrs." />
                                                </asp:DropDownList>
                                                <asp:TextBox ID="txtFirstName" runat="server" Text="" MaxLength="150" Width="200px"></asp:TextBox>
                                                <asp:TextBox ID="txtLastName" runat="server" MaxLength="150" Text="" Width="200px"></asp:TextBox>
                                                <asp:RequiredFieldValidator CssClass="validationErrorControl" runat="server" ID="rfvTitle"
                                                    ControlToValidate="ddlTitle" ErrorMessage="Require Title." Text="" ForeColor="Red"
                                                    Display="None" ValidationGroup="UserDetail" />
                                                <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="vceTitle" TargetControlID="rfvTitle"
                                                    HighlightCssClass="validationError" Width="240px" PopupPosition="Right" />
                                                <asp:RequiredFieldValidator CssClass="validationErrorControl" runat="server" ID="rfvLastName"
                                                    ControlToValidate="txtLastName" ErrorMessage="Require last name." Text="" ForeColor="Red"
                                                    Display="None" ValidationGroup="UserDetail" />
                                                <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="vceLastName" TargetControlID="rfvLastName"
                                                    HighlightCssClass="validationError" Width="240px" PopupPosition="Right" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                Gender
                                            </td>
                                            <td>
                                                <asp:DropDownList ID="ddlGender" runat="server" Width="100px">
                                                    <asp:ListItem Text="Male" Value="M" />
                                                    <asp:ListItem Text="Female" Value="F" />
                                                </asp:DropDownList>
                                            </td>
                                            <td>
                                                Email
                                            </td>
                                            <td>
                                                <asp:TextBox ID="txtEmail" runat="server" Text="" MaxLength="150" Width="200px"></asp:TextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                DOB
                                            </td>
                                            <td>
                                                <asp:TextBox ID="txtDOB" runat="server" Text="" MaxLength="12" Width="100px"></asp:TextBox>
                                                <asp:ImageButton runat="server" ID="imgDOB" ImageUrl="../Images/Icons/16/Calendar-icon.png"
                                                    AlternateText="Click here to display calendar" Style="vertical-align: middle" />
                                                <ajaxToolkit:CalendarExtender ID="txtDOB_CalendarExtender" runat="server" Enabled="True"
                                                    TargetControlID="txtDOB" PopupButtonID="imgDOB" Format="dd-MMM-yyyy">
                                                </ajaxToolkit:CalendarExtender>
                                                <asp:RequiredFieldValidator CssClass="validationErrorControl" runat="server" ID="rfvDOB"
                                                    ControlToValidate="txtDOB" ErrorMessage="Require DOB." Text="" ForeColor="Red"
                                                    Display="None" ValidationGroup="UserDetail" />
                                                <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="vceDOB" TargetControlID="rfvDOB"
                                                    HighlightCssClass="validationError" Width="240px" PopupPosition="Right" />
                                            </td>
                                            <td>
                                                Phone No
                                            </td>
                                            <td>
                                                <asp:TextBox ID="txtPhoneNo" runat="server" Text="" MaxLength="50" Width="200px"></asp:TextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                &nbsp;
                                            </td>
                                            <td>
                                                &nbsp;
                                            </td>
                                            <td>
                                                &nbsp;
                                            </td>
                                            <td>
                                                &nbsp;
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                User Profile
                                            </td>
                                            <td>
                                                <asp:DropDownList ID="ddlUserProfile" runat="server">
                                                </asp:DropDownList>
                                            </td>
                                            <td>
                                                &nbsp;
                                            </td>
                                            <td>
                                                &nbsp;
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                Permission
                                            </td>
                                            <td>
                                                <asp:DropDownList ID="ddlPermission" runat="server">
                                                    <asp:ListItem Text="Default" Value="1" />
                                                </asp:DropDownList>
                                            </td>
                                            <td>
                                                &nbsp;
                                            </td>
                                            <td>
                                                &nbsp;
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                &nbsp;
                                            </td>
                                            <td>
                                                &nbsp;
                                            </td>
                                            <td>
                                                &nbsp;
                                            </td>
                                            <td>
                                                &nbsp;
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                User Name
                                            </td>
                                            <td>
                                                <asp:TextBox ID="txtUserName" runat="server" MaxLength="150" Text="" Width="200px"></asp:TextBox>
                                                <asp:RequiredFieldValidator CssClass="validationErrorControl" runat="server" ID="rfvUserName"
                                                    ControlToValidate="txtUserName" ErrorMessage="Require user name." Text="" ForeColor="Red"
                                                    Display="None" ValidationGroup="UserDetail" />
                                                <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="vceUserName" TargetControlID="rfvUserName"
                                                    HighlightCssClass="validationError" Width="240px" PopupPosition="Right" />
                                            </td>
                                            <td>
                                                &nbsp;
                                            </td>
                                            <td>
                                                &nbsp;
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                Password
                                            </td>
                                            <td>
                                                <asp:TextBox ID="txtPassword" runat="server" MaxLength="150" Text="" TextMode="Password"
                                                    Width="200px"></asp:TextBox>
                                                <asp:RequiredFieldValidator CssClass="validationErrorControl" runat="server" ID="rfvPassword"
                                                    ControlToValidate="txtPassword" ErrorMessage="Require user name." Text="" ForeColor="Red"
                                                    Display="None" ValidationGroup="UserDetail" />
                                                <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="vcePassword" TargetControlID="rfvPassword"
                                                    HighlightCssClass="validationError" Width="240px" PopupPosition="Right" />
                                            </td>
                                            <td>
                                                &nbsp;
                                            </td>
                                            <td>
                                                &nbsp;
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="4">
                                                <asp:Label ID="lblMessage" runat="server" Font-Bold="true" ForeColor="Red" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="2">
                                                &nbsp;
                                            </td>
                                            <td colspan="2">
                                                &nbsp;
                                            </td>
                                        </tr>
                                    </table>
                                </asp:Panel>
                                <ajaxToolkit:RoundedCornersExtender ID="rceForm" runat="server" TargetControlID="pnlUserDetailForm"
                                    Radius="10" Corners="All" BorderColor="Gray" />
                                <br />
                                <h2>
                                    School Information</h2>
                                <asp:GridView runat="server" AutoGenerateColumns="false" ID="gvSchoolList" CssClass="table"
                                    Width="600px" onrowdatabound="gvSchoolList_RowDataBound">
                                    <Columns>
                                        <asp:TemplateField Visible="false">
                                            <ItemTemplate>
                                                <asp:Label ID="lblUserSchoolID" runat="server" Text='<%# Eval("UserSchoolID")%>'></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField Visible="false">
                                            <ItemTemplate>
                                                <asp:Label ID="lblUserID" runat="server" Text='<%# Eval("UserID")%>'></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField Visible="true">
                                            <ItemTemplate>
                                                <asp:CheckBox runat="server" ID="chkSelectSchool" />
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField ItemStyle-Width="30px" HeaderText="SchoolID" Visible="false">
                                            <ItemTemplate>
                                                <asp:Label ID="lblSchoolID" runat="server" Text='<%# Eval("SchoolID")%>'></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField ItemStyle-Width="30px" HeaderText="School" Visible="true">
                                            <ItemTemplate>
                                                <asp:Label ID="lblSchoolName" runat="server" Text='<%# Eval("SchoolName")%>'></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField ItemStyle-Width="150px" HeaderText="Start Date" Visible="true">
                                            <ItemTemplate>
                                                <asp:TextBox ID="txtSchoolStartDate" runat="server" Text="" MaxLength="12" Width="100px"></asp:TextBox>
                                                <asp:ImageButton runat="server" ID="imgSchoolStartDate" ImageUrl="../Images/Icons/16/Calendar-icon.png"
                                                    AlternateText="Click here to display calendar" Style="vertical-align: middle" />
                                                <ajaxToolkit:CalendarExtender ID="txtSchoolStartDate_CalendarExtender" runat="server"
                                                    Enabled="True" TargetControlID="txtSchoolStartDate" PopupButtonID="imgSchoolStartDate"
                                                    Format="dd-MMM-yyyy">
                                                </ajaxToolkit:CalendarExtender>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField ItemStyle-Width="150px" HeaderText="Drop Date" Visible="true">
                                            <ItemTemplate>
                                                <asp:TextBox ID="txtSchoolDropDate" runat="server" Text="" MaxLength="12" Width="100px"></asp:TextBox>
                                                <asp:ImageButton runat="server" ID="imgSchoolDropDate" ImageUrl="../Images/Icons/16/Calendar-icon.png"
                                                    AlternateText="Click here to display calendar" Style="vertical-align: middle" />
                                                <ajaxToolkit:CalendarExtender ID="txtSchoolDropDate_CalendarExtender" runat="server"
                                                    Enabled="True" TargetControlID="txtSchoolDropDate" PopupButtonID="imgSchoolDropDate"
                                                    Format="dd-MMM-yyyy">
                                                </ajaxToolkit:CalendarExtender>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                    </Columns>
                                </asp:GridView>
                                <br />
                                <asp:Button ID="btnSubmit" runat="server" CausesValidation="true" CssClass="submitButton"
                                    OnClick="btnSubmit_Click" Text="Save" ValidationGroup="UserDetail" />
                            </ContentTemplate>
                        </asp:UpdatePanel>
                    </ContentTemplate>
                </ajaxToolkit:TabPanel>
            </ajaxToolkit:TabContainer>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
